package servletsLogin;

//import Utils.User;
//import Utils.dbManager;
import Utils.User;
import Utils.dbManager;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.SQLException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

/**
 *
 * @author aleX
 */
@WebServlet(name="ErrorLoginServlet", urlPatterns={"/ErrorLoginServlet"})
public class ErrorLoginServlet extends HttpServlet {
    private dbManager manager;

  
 
    //@Override    
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
      
        response.setContentType("text/html");
        PrintWriter out = response.getWriter();
        String docType=
         "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\n";    
out.println(docType+"<html>");
out.println("<head>"
        + "<link rel=\"stylesheet\" type=\"text/css\" href=\"css/bootstrap.css\"> ");
out.println("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">");
out.println("<title>LOGIN Page</title>");
out.println("<style type=\"text/css\">");
out.println("</style>");
out.println("</head>");
out.println("<body>");
out.println("<div class=\"navbar  navbar-inverse nvbar-fixed-top\">" +
"<div class=\"navbar-inner\">" +
"<div class=\"container\">" +
 

"<a class=\"btn btn-navbar navbar-inverse nvbar-fixed-top \" data-toggle=\"collapse\" data-target=\".nav-collapse\">" +
"<span class=\"icon-bar\"></span>" +
"<span class=\"icon-bar\"></span>" +
"<span class=\"icon-bar\"></span>" +
"</a>" +
 


           " <ul class=\"nav\">" +
   " <li >" +
   " <a href=\"#\"></a>" +
   " </li>" +
   " <li class=\"active\"><a href=\"#\">Home</a></li>" +
   " <li><a href=\"#\"></a></li>" +
   " </ul>" +

"<div class=\"nav-collapse collapse\">" +

"</div>" +
 
"</div>" +
"</div> </div>");
out.println("<div id=\"wb_Text1\" style=\"position:absolute;left:357px;top:170px;width:606px;height:34px;z-index:0;\">");
out.println("<h2> Autenticazione </h2> </div>");
out.println("<div id=\"wb_Text2\" style=\"position:absolute;left:357px;top:230px;width:606px;height:34px;z-index:0;\">");
out.println("<p class=\"text-error\" <h5> Errore! Password o Username errati! </h5> </p> </div>");


out.println("<div class=\"container\">"  +
  "<form method=\"get\" action=\"Autentica\" style=\"position:absolute;left:357px;top:270px;width:120px;height:22px;z-index:1;\">" +
    "Username:<input type=\"text\" class=\"input-large\" name=\"username\" placeholder=\"Username\" /><br />" +
    "Password:<input type=\"password\" class=\"input-large\" name=\"password\" placeholder=\"Password\" size=\"15\" /><br />" +
    "<input type=\"submit\" value=\"Login\" class=\"btn btn-success\"  >" +
    "</form> </div>");

out.println("<div id=\"wb_Text4\" style=\"position:absolute;left:200px;top:64px;\">");
out.println("<h1>MERCATO AGRO-ALIMENTARE</h1>");
out.println("</body>");
out.println("</html>");
    }}